﻿using FastReport.DevComponents.DotNetBar;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PrintLabel.Tools
{
     class ShowMessage
    {
        public static void ShowErrorMessagebox(Form form,string content)
        {
            AntdUI.Modal.open(new AntdUI.Modal.Config((Form)form, "唛头打印", content, AntdUI.TType.Error) {
                OnButtonStyle = (id, btn) =>
                {
                    btn.BackExtend = "135, #6253E1, #04BEFE";
                },
                CancelText = null,
                OkText = "知道了"
            }); 
        }
        public static DialogResult ShowAskMessagebox(Form form, string content)
        {
           return   AntdUI.Modal.open(new AntdUI.Modal.Config((Form)form, "唛头打印", content, AntdUI.TType.Info ));
        }
        public static DialogResult ShowYesNoAskMessagebox(Form form,string content)
        {
            return AntdUI.Modal.open(new AntdUI.Modal.Config((Form)form, "唛头打印", content, AntdUI.TType.Info) { OkText="是",CancelText="否"});
        }
        public static void ShowNotification(Form form, string context)
        {
            AntdUI.Notification.success(form,"唛头打印", context, AntdUI.TAlignFrom.Top);
        }
        public static DialogResult ShowIsCheckDoneBox(Form form, string content)
        {
            return AntdUI.Modal.open(new AntdUI.Modal.Config((Form)form, "唛头打印", content, AntdUI.TType.Info) { OkText = "检验完毕", CancelText = "未检验完毕" });
        }
    }
}
